package com.treehouse.gui.loaderview.viewComp;

import java.awt.Component;

import javax.swing.JProgressBar;
import javax.swing.JTable;
import javax.swing.SwingConstants;
import javax.swing.table.TableCellRenderer;

public class ActorScenesCellRenderer extends JProgressBar implements TableCellRenderer {
	public ActorScenesCellRenderer() {
		super(SwingConstants.HORIZONTAL);
		setSize(115,15);
		}
		public Component getTableCellRendererComponent(JTable table, Object value,
		boolean isSelected,
		boolean hasFocus,
		int row,int column) {
		if (value == null) {
		return this;
		}
		if (value instanceof JProgressBar) {
		setValue(((JProgressBar)value).getValue());
		}
		else {
		setValue(0);
		}
		return this;
		}
		}